package magicsquare;

import java.util.Arrays;

public class Main {
	
	public static void main(final String[] args) {
		final int squareBase = (args.length == 0) ? 4 : Integer.parseInt(args[0]);
		Ctx.print("squareBase: " + squareBase);
		Ctx.init(squareBase);
		
//		// 1
//		final RowSequenceBuilder si = new RowSequenceBuilder();
//		for (si.next(); si.hasNext(); si.next()) {
//		}
//		final RowSequence[] rowSequences = si.getRowSequenceSet().toArray(new RowSequence[0]);
//		Arrays.sort(rowSequences);
//		final int[] idx = new int[1 + (Ctx.lasNumber / 2) - (Ctx.squareBase / 2)];
//		Ctx.print("");
//		Ctx.print("Row sequences");
//		for (int i = 0; i < rowSequences.length; i++) {
//			final int firstSetBit = rowSequences[i].nextSetBit(0);
//			if (idx[firstSetBit+1] == 0) {
//				idx[firstSetBit+1] = idx[firstSetBit] + 1;
//			}
//			idx[firstSetBit+1] ++;	
//			
//			Ctx.print((i + 1) + " => " + rowSequences[i] + " - " + Arrays.toString(idx));
//		}
	}
}
